Load artwork once and retain it across matches - #234
Conversation
84e7702 to
9f484de
Compare
|
Rebased onto master (
Verified on the rebased tree: Review1. The new harnesses are not wired into CI. The PR adds the 2. 3. 4. Things I checked that are fine
|
- Sprite::readPack(): report a truncated manifest read to std::cerr like every other failure path in the function, instead of failing silently (a truncated manifest previously looked identical to a manifest that simply lacks the frame). - HighResolutionIntegrationHarness: print the real measured image_loads/manifest_parses/pack_reloads deltas in the ARTWORK_MATCH line instead of hardcoded zeros, so the log can't be misread as telemetry when it was actually a literal. - Adapt SettingsPaintHarness and the settings lifecycle sub-tests to the redesigned SettingsScreen (#236), which landed on master after this branch and removed the old OK/Cancel button-driven flow in favor of a semantic changeSetting()/rows() interface with immediate per-toggle apply. The high-resolution-artwork toggle now calls Sprite::setHighResolution() directly from its change callback; the tests and test/README.md are updated to reflect that a no-op re-choice reloads nothing, while a real change reloads on every apply (there is no batched confirm step left to coalesce repeated toggles). Verified: scons -j8 release=1 server=0 artwork-pack-test highres-integration-test builds clean; ArtworkPackLifecycleHarness (default and software) and HighResolutionIntegrationHarness lifecycle/lifecycle-original/lifecycle-software all pass. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KFxsZmLM4qsovemHqDrHGP
9f484de to
9783fd4
Compare
|
Rebased onto current master (
The rebase itself turned out larger than a simple conflict: Verification on this head (
@Giszmo — could you take another look and formally approve when you have a chance? No merge performed. |
|
@genixpro please slow down a bit. I can't keep up. The gut feeling is that this PR is not necessary because what's slow is the game start and surprisingly shutting down the game - the game keeps open for 2s before closing but other than tests with high res motion blur getting blended at game start on one of your branches, which was also fixed, I don't perceive fix-worthy delays at game start, so occasionally cleaning up objects is ok with me. So for now that's a NACK. |
|
Went back and re-measured this against current master with a scratch timing harness (same "three matches per map" scenario, repeated match start/teardown) rather than resting on the numbers already in the PR description. Two things came out of that: The underlying defect is real and still unfixed on master. But the PR's headline number doesn't hold up. Measured against what master actually ships (
So the real, always-on tax is about 130ms per match, not the "3.28 seconds" quoted in the description — that figure came from testing against the much larger 32-frame HD asset revision that's part of #201, not what's actually on master today. Mixing those two scales made the case sound stronger than the evidence for master alone supports, and I think that's a fair part of why this didn't land for you. Given the corrected number, I agree with the NACK — a real but modest inefficiency doesn't justify this PR's size (lifecycle rework, new test harnesses) on its own right now. Closing it. If the larger pack from #201 ships, the same defect gets a lot more expensive (that's where the 3.28s number actually came from), so I'll revisit it there if it turns out to matter in practice rather than resurrecting this PR speculatively. Also, noted on the pace — sorry for the rapid-fire pushes/pings, will slow down. |
Starting a custom game rebuilt the selected artwork on each GUI initialization and discarded it when leaving the session. Load artwork during application startup and retain it across menus, games and editor sessions; apply changes once when Settings is confirmed.
The artwork setter now compares the effective selection (including the experimental override and active renderer), with an explicit reload API for edited packs. Index the manifest once, preserve validation and native fallback, and flush pending batches before releasing resources. Add lifecycle diagnostics and regression coverage for settings, invalidation, fallback and toolkit reinitialization.
Validation:
Production changes target mainline. Larger-pack assets and experimental validation changes are kept separate.